package com.xvjialing.lytech.weatherreport.service;

import com.xvjialing.lytech.weatherreport.bean.Weather;
import com.xvjialing.lytech.weatherreport.net.WeatherDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class WeatherReportServiceImpl implements WeatherReportService{

    @Autowired
    private WeatherDataService weatherDataService;

    @Override
    public Weather getWeatherByCityCode(String cityCode) {
        return weatherDataService.getWeatherDataByCityCode(cityCode).getData();
    }

    @Override
    public Weather getWeatherByCityName(String cityName) {
        return weatherDataService.getWeatherDataByCityName(cityName).getData();
    }
}